package design.proxy.dynamic;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * \* User: Administrator
 * <p>
 * \* Date: 2020/9/21
 * <p>
 * \* Time: 16:49
 * <p>
 * \* Description:
 * \
 */
public class GamePlayIH implements InvocationHandler {

    Object target;

    public GamePlayIH(Object obj) {
        this.target = obj;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("before");
        Object result = method.invoke(this.target, args);
        System.out.println("after");
        return result;
    }
}
